<template>
	<view class="container">
		<NavBar :obj="{ title: title, color: '#000' }" />
		<view class="content m-30">
			<view class="value">
				<mp-html :content="info" />
			</view>
		</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import { port, goBack, hint } from '/service/port';
	import { onLoad, onShow } from '@dcloudio/uni-app';

	const info = ref({});

	const title = ref('');
	const type = ref('');
	async function getCommunal() {
		let res = await port('getCommunal', { type: type.value });
		info.value = res.data;
	}

	onShow(() => {
		getCommunal();
	});

	onLoad((e) => {
		if(e.title){
			title.value = e.title;
		}
		if(e.type){
			type.value = e.type;
		}
	});
</script>

<style scoped lang="scss">
	img{
		width: 100% !important;
	}
	.container {
		background-color: #fff;
		.content {
			margin-top: 32rpx;
			.title {
				font-weight: 500;
				font-size: 42rpx;
				color: #000000;
			}

			.time {
				margin-top: 32rpx;
				.divs {
					> text {
						font-weight: 400;
						font-size: 22rpx;
						color: #999999;
						margin-left: 5rpx;
					}
				
					&:first-child {
						margin-right: 36rpx;
					}
				}
			}
			.value{
				margin-top: 71rpx;
			}
		}
	}
</style>
